package cn.tedu.cateringsystem.controller;

import cn.tedu.cateringsystem.mapper.TypeMapper;
import cn.tedu.cateringsystem.pojo.entity.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/type/")
public class TypeController {
    @Autowired
    TypeMapper mapper;
    @RequestMapping("select")
    public List<Type> select(){
        return mapper.select();
    }
    @RequestMapping("insert")
    public void insert(String name){
        mapper.insert(name);
    }
}
